#ifndef ADB87C9B_7FCA_43FD_9F6A_4AED593F2A00
#define ADB87C9B_7FCA_43FD_9F6A_4AED593F2A00

/*
    定义日志消息类， 进行日志中间信息的存储：
    //当前日志的时间戳
    //当前文件的文件名
    //当前日志所在的行号
    //日志器
    //日志消息
    //线程id
*/

#include<iostream>
#include<thread>
#include<ctime>
#include<string>
#include"util.hpp"
#include"level.hpp"

namespace mian_yang
{
    class LogMsg
    {
    public:
        time_t _ctime;
        std::string _file;
        size_t _line;
        std::thread::id _tid;
        std::string _logger;
        LogLevel::value _level;
        std::string _payload;

        LogMsg(const std::string file, 
            const size_t line, 
            const std::string logger,
            const std::string msg,  
            const LogLevel::value level)
        :_ctime(util::Date::getTime()),
        _file(file),
        _line(line),
        _logger(logger),
        _payload(msg),
        _level(level),
        _tid(std::this_thread::get_id())
        {
        }
    };
    
}





#endif /* ADB87C9B_7FCA_43FD_9F6A_4AED593F2A00 */
